/**
 * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
 * Copyright (c) <spug.dev@gmail.com>
 * Released under the AGPL-3.0 License.
 */
import React from 'react';
import {
  DashboardOutlined,
  DesktopOutlined,
  CloudServerOutlined,
  CodeOutlined,
  FlagOutlined,
  ScheduleOutlined,
  DeploymentUnitOutlined,
  MonitorOutlined,
  AlertOutlined,
  SettingOutlined
} from '@ant-design/icons';

import HomeIndex from './pages/home';

import Authorization from './pages/exec/Authorization';
import Changecard from './pages/exec/Changecard';

import SwipeCard from './pages/exec/SwipeCard';
import Report from './pages/exec/Report';
import Abnormal from './pages/exec/Abnormal';
import ManagementCard from './pages/exec/ManagementCard';
import SetCard from './pages/deploy/SetCard';
import RecordsManagement from './pages/deploy/RecordsManagement';

import BasicInformation from './pages/config/BasicInformation';
import CabinetSetup from './pages/config/CabinetSetup';
import ZoneManagement from './pages/config/ZoneManagement';

import ControllerRegistration from './pages/config/ControllerRegistration';
import remoteControl from './pages/config/remoteControl';

import AlarmIndex from './pages/alarm/alarm';
import SystemRole from './pages/system/role';
import AlarmContact from './pages/alarm/contact';
import SystemAccount from './pages/system/account';


export default [
  { icon: <DesktopOutlined />, title: '营业', path: '/home', component: HomeIndex },
  // {
  //   icon: <DashboardOutlined/>,
  //   title: 'Dashboard',
  //   auth: 'dashboard.dashboard.view',
  //   path: '/dashboard',
  //   component: DashboardIndex
  // },
  // {icon: <CloudServerOutlined/>, title: '主机管理', auth: 'host.host.view', path: '/host', component: HostIndex},
  {
    icon: <CodeOutlined />,
    title: '记录',
    auth: 'exec.template.Changecard|exec.transfer.SwipeCard|exec.transfer.Report|exec.transfer.Abnormal|exec.transfer.ManagementCard',
    child: [
      { title: '授权记录', auth: 'exec.task.Authorization', path: '/exec/Authorization', component: Authorization },
      { title: '手牌更换', auth: 'exec.template.Changecard', path: '/exec/Changecard', component: Changecard },
      { title: '刷卡记录', auth: 'exec.transfer.SwipeCard', path: '/exec/SwipeCard', component: SwipeCard },
      { title: '上报记录', auth: 'exec.transfer.Report', path: '/exec/Report', component: Report },
      { title: '柜子异常', auth: 'exec.transfer.Abnormal', path: '/exec/Abnormal', component: Abnormal },
      
    ]
  },
  {
    icon: <FlagOutlined />,
    title: '制卡',
    auth: 'deploy.app.SetCard|deploy.repository.RecordsManagement',
    child: [
      { title: '设置卡', auth: 'deploy.app.SetCard', path: '/deploy/SetCard', component: SetCard },
      { title: '管理卡', auth: 'deploy.repository.RecordsManagement', path: '/deploy/RecordsManagement', component: RecordsManagement },
      { title: '管理卡记录', auth: 'exec.transfer.ManagementCard', path: '/exec/ManagementCard', component: ManagementCard },
    ]
  },
  // {
  //   icon: <ScheduleOutlined/>,
  //   title: '任务计划',
  //   auth: 'schedule.schedule.view',
  //   path: '/schedule',
  //   component: ScheduleIndex
  // },
  {
    icon: <DeploymentUnitOutlined />,
    title: '安装',
    auth: 'config.env.BasicInformation|config.src.CabinetSetup|config.app.ZoneManagement|config.app.ControllerRegistration|config.app.remoteControl',
    child: [
      { title: '基本信息', auth: 'config.env.BasicInformation', path: '/config/BasicInformation', component: BasicInformation },
      { title: '物理/管理区', auth: 'config.app.ZoneManagement', path: '/config/ZoneManagement', component: ZoneManagement },
      { title: '柜号设置', auth: 'config.src.CabinetSetup', path: '/config/CabinetSetup', component: CabinetSetup },
      { title: '控制器注册', auth: 'config.app.ControllerRegistration', path: '/config/ControllerRegistration', component: ControllerRegistration },
      { title: '远程控制', auth: 'config.app.remoteControl', path: '/config/remoteControl', component: remoteControl },
     
    ]
  },
  // {icon: <MonitorOutlined/>, title: '监控中心', auth: 'monitor.monitor.view', path: '/monitor', component: MonitorIndex},
  // {
  //   icon: <AlertOutlined />,
  //   title: '设置',
  //   auth: 'alarm.alarm.view|alarm.contact.view|alarm.group.view',
  //   child: [
  //     { title: '账户管理', auth: 'alarm.alarm.view', path: '/alarm/alarm', component: AlarmIndex },
  //     { title: '角色管理', auth: 'alarm.contact.view', path: '/alarm/contact', component: AlarmContact },

  //   ]
  // },
  {
    icon: <SettingOutlined />,
    title: '系统管理',
    auth: "system.account.view|system.role.view|system.setting.view",
    child: [
      // { title: '登录日志', auth: 'system.login.view', path: '/system/login', component: SystemLogin },
       { title: '账户管理', auth: 'system.account.view', path: '/system/account', component: SystemAccount },
      { title: '角色管理', auth: 'system.role.view', path: '/system/role', component: SystemRole },
      // { title: '系统设置', auth: 'system.setting.view', path: '/system/setting', component: SystemSetting },
    ]
  },
  // {path: '/welcome/index', component: WelcomeIndex},
  // {path: '/welcome/info', component: WelcomeInfo},
]
